import time
import threading



def singing():
    print(threading.current_thread())
    for i in range(5):
        print(f"唱歌ing {i}")
        time.sleep(0.5)


def dancing():
    print(threading.current_thread())
    for i in range(5):
        print(f"跳舞ing {i}")
        time.sleep(0.5)        
        
if __name__ == '__main__' :
    
    #创建线程对象，指定线程函数的入口地址，返回线程对象
    t1 = threading.Thread(target=singing)
    t2 = threading.Thread(target=dancing)

    #线程启动
    t1.start()
    t2.start()
    
    print(threading.current_thread())